3.148 \(\int \cos (a+b x) \cot ^3(a+b x) \, dx\)

Optimal. Leaf size=49 \[ -\frac{3 \cos (a+b x)}{2 b}-\frac{\cos (a+b x) \cot ^2(a+b x)}{2 b}+\frac{3 \tanh ^{-1}(\cos (a+b x))}{2 b} \]

[Out]

(3*ArcTanh[Cos[a + b*x]])/(2*b) - (3*Cos[a + b*x])/(2*b) - (Cos[a + b*x]*Cot[a + b*x]^2)/(2*b)

________________________________________________________________________________________

Rubi [A]  time = 0.0292992, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {2592, 288, 321, 206} \[ -\frac{3 \cos (a+b x)}{2 b}-\frac{\cos (a+b x) \cot ^2(a+b x)}{2 b}+\frac{3 \tanh ^{-1}(\cos (a+b x))}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]*Cot[a + b*x]^3,x]

[Out]

(3*ArcTanh[Cos[a + b*x]])/(2*b) - (3*Cos[a + b*x])/(2*b) - (Cos[a + b*x]*Cot[a + b*x]^2)/(2*b)

Rule 2592

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, (a*Sin[e + f*x])/ff
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 288

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^
n)^(p + 1))/(b*n*(p + 1)), x] - Dist[(c^n*(m - n + 1))/(b*n*(p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \cos (a+b x) \cot ^3(a+b x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x^4}{\left (1-x^2\right )^2} \, dx,x,\cos (a+b x)\right )}{b}\\ &=-\frac{\cos (a+b x) \cot ^2(a+b x)}{2 b}+\frac{3 \operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\cos (a+b x)\right )}{2 b}\\ &=-\frac{3 \cos (a+b x)}{2 b}-\frac{\cos (a+b x) \cot ^2(a+b x)}{2 b}+\frac{3 \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (a+b x)\right )}{2 b}\\ &=\frac{3 \tanh ^{-1}(\cos (a+b x))}{2 b}-\frac{3 \cos (a+b x)}{2 b}-\frac{\cos (a+b x) \cot ^2(a+b x)}{2 b}\\ \end{align*}

Mathematica [A]  time = 0.0268677, size = 86, normalized size = 1.76 \[ -\frac{\cos (a+b x)}{b}-\frac{\csc ^2\left (\frac{1}{2} (a+b x)\right )}{8 b}+\frac{\sec ^2\left (\frac{1}{2} (a+b x)\right )}{8 b}-\frac{3 \log \left (\sin \left (\frac{1}{2} (a+b x)\right )\right )}{2 b}+\frac{3 \log \left (\cos \left (\frac{1}{2} (a+b x)\right )\right )}{2 b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]*Cot[a + b*x]^3,x]

[Out]

-(Cos[a + b*x]/b) - Csc[(a + b*x)/2]^2/(8*b) + (3*Log[Cos[(a + b*x)/2]])/(2*b) - (3*Log[Sin[(a + b*x)/2]])/(2*
b) + Sec[(a + b*x)/2]^2/(8*b)

________________________________________________________________________________________

Maple [A]  time = 0.013, size = 68, normalized size = 1.4 \begin{align*} -{\frac{ \left ( \cos \left ( bx+a \right ) \right ) ^{5}}{2\,b \left ( \sin \left ( bx+a \right ) \right ) ^{2}}}-{\frac{ \left ( \cos \left ( bx+a \right ) \right ) ^{3}}{2\,b}}-{\frac{3\,\cos \left ( bx+a \right ) }{2\,b}}-{\frac{3\,\ln \left ( \csc \left ( bx+a \right ) -\cot \left ( bx+a \right ) \right ) }{2\,b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^4/sin(b*x+a)^3,x)

[Out]

-1/2/b*cos(b*x+a)^5/sin(b*x+a)^2-1/2*cos(b*x+a)^3/b-3/2*cos(b*x+a)/b-3/2/b*ln(csc(b*x+a)-cot(b*x+a))

________________________________________________________________________________________

Maxima [A]  time = 1.01758, size = 76, normalized size = 1.55 \begin{align*} \frac{\frac{2 \, \cos \left (b x + a\right )}{\cos \left (b x + a\right )^{2} - 1} - 4 \, \cos \left (b x + a\right ) + 3 \, \log \left (\cos \left (b x + a\right ) + 1\right ) - 3 \, \log \left (\cos \left (b x + a\right ) - 1\right )}{4 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4/sin(b*x+a)^3,x, algorithm="maxima")

[Out]

1/4*(2*cos(b*x + a)/(cos(b*x + a)^2 - 1) - 4*cos(b*x + a) + 3*log(cos(b*x + a) + 1) - 3*log(cos(b*x + a) - 1))
/b

________________________________________________________________________________________

Fricas [A]  time = 2.035, size = 232, normalized size = 4.73 \begin{align*} -\frac{4 \, \cos \left (b x + a\right )^{3} - 3 \,{\left (\cos \left (b x + a\right )^{2} - 1\right )} \log \left (\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right ) + 3 \,{\left (\cos \left (b x + a\right )^{2} - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right ) - 6 \, \cos \left (b x + a\right )}{4 \,{\left (b \cos \left (b x + a\right )^{2} - b\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4/sin(b*x+a)^3,x, algorithm="fricas")

[Out]

-1/4*(4*cos(b*x + a)^3 - 3*(cos(b*x + a)^2 - 1)*log(1/2*cos(b*x + a) + 1/2) + 3*(cos(b*x + a)^2 - 1)*log(-1/2*
cos(b*x + a) + 1/2) - 6*cos(b*x + a))/(b*cos(b*x + a)^2 - b)

________________________________________________________________________________________

Sympy [A]  time = 3.35844, size = 241, normalized size = 4.92 \begin{align*} \begin{cases} - \frac{12 \log{\left (\tan{\left (\frac{a}{2} + \frac{b x}{2} \right )} \right )} \tan ^{4}{\left (\frac{a}{2} + \frac{b x}{2} \right )}}{8 b \tan ^{4}{\left (\frac{a}{2} + \frac{b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )}} - \frac{12 \log{\left (\tan{\left (\frac{a}{2} + \frac{b x}{2} \right )} \right )} \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )}}{8 b \tan ^{4}{\left (\frac{a}{2} + \frac{b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )}} + \frac{\tan ^{6}{\left (\frac{a}{2} + \frac{b x}{2} \right )}}{8 b \tan ^{4}{\left (\frac{a}{2} + \frac{b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )}} - \frac{18 \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )}}{8 b \tan ^{4}{\left (\frac{a}{2} + \frac{b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )}} - \frac{1}{8 b \tan ^{4}{\left (\frac{a}{2} + \frac{b x}{2} \right )} + 8 b \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )}} & \text{for}\: b \neq 0 \\\frac{x \cos ^{4}{\left (a \right )}}{\sin ^{3}{\left (a \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**4/sin(b*x+a)**3,x)

[Out]

Piecewise((-12*log(tan(a/2 + b*x/2))*tan(a/2 + b*x/2)**4/(8*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2) -
 12*log(tan(a/2 + b*x/2))*tan(a/2 + b*x/2)**2/(8*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2) + tan(a/2 +
b*x/2)**6/(8*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2) - 18*tan(a/2 + b*x/2)**2/(8*b*tan(a/2 + b*x/2)**
4 + 8*b*tan(a/2 + b*x/2)**2) - 1/(8*b*tan(a/2 + b*x/2)**4 + 8*b*tan(a/2 + b*x/2)**2), Ne(b, 0)), (x*cos(a)**4/
sin(a)**3, True))

________________________________________________________________________________________

Giac [B]  time = 1.18454, size = 189, normalized size = 3.86 \begin{align*} -\frac{\frac{\frac{14 \,{\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + \frac{3 \,{\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 1}{\frac{\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} - \frac{{\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}}} + \frac{\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 6 \, \log \left (\frac{{\left | -\cos \left (b x + a\right ) + 1 \right |}}{{\left | \cos \left (b x + a\right ) + 1 \right |}}\right )}{8 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4/sin(b*x+a)^3,x, algorithm="giac")

[Out]

-1/8*((14*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 3*(cos(b*x + a) - 1)^2/(cos(b*x + a) + 1)^2 - 1)/((cos(b*x +
 a) - 1)/(cos(b*x + a) + 1) - (cos(b*x + a) - 1)^2/(cos(b*x + a) + 1)^2) + (cos(b*x + a) - 1)/(cos(b*x + a) +
1) + 6*log(abs(-cos(b*x + a) + 1)/abs(cos(b*x + a) + 1)))/b